package com.yeti.form;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

import com.yeti.form.RegistroForm;

public class PasswordMatchValidator implements ConstraintValidator<PasswordMatch, Object>{

	public void initialize(PasswordMatch constraint) {
	 }

	 public boolean isValid(Object target, ConstraintValidatorContext context) {
		 RegistroForm user = (RegistroForm) target;
		 return user.getPassword().equals(user.getPassword2());
	 }
	
}
